﻿<div ms-controller="W_KSUSERGL">

    <!-- 表格 -->
    <div class="default-tab ft14 pt20 hover-btn">
        <table class="table table-striped table-responsive table-hover">
            <thead>
                <tr>
                    <th style="text-align: center">&nbsp;</th>
                    <th>姓名</th>
                    <th>分数</th>
                    <th>是否及格</th>
                    <th>是否交卷</th>
                    <th>阅卷老师</th>
                    <th style="width: 40px" ms-visible="stu!=1">
                        操作
                    </th>
                </tr>
            </thead>
            <tbody>
                <tr ms-repeat-item="ListData">
                    <td class="text-center">&nbsp;</td>
                    <td>{{ComFunJS.convertuser(item.CRUser)}}</td>
                    <td>{{item.Record}}</td>
                    <td>{{item.Record>item.PassRecord?"及格":"不及格"}}</td>
                    <td>{{item.ISJJ==1?"是":"否"}}</td>
                    <td>{{ComFunJS.convertuser(item.YJTeacher)}}</td>
                    <td ms-visible="stu!=1">
                        <button type="button" class="btn btn-default btn-sm btn-tm btn-rid0" ms-click="DFView(tempindex.KSAPID,item.CRUser)" ms-if="stu!=1">阅卷打分</button>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</div>

<script>
    var tempindex = avalon.define({
        $id: "W_KSUSERGL",
        InitWigetData: function (data) {
            tempindex.KSAPID = data.Id;
            tempindex.stu = data.stu;
            tempindex.GetLIST();
        },
        KSAPID: "",
        stu: "",
        GetLIST: function () {
            $.getJSON('/API/VIEWAPI.ashx?Action=KSGL_GETKSUSER', { p: 1, pagecount: model.page.pagecount, P1: tempindex.KSAPID }, function (resultData) {
                if (resultData.ErrorMsg == "") {
                    model.ListData.clear();
                    model.ListData = resultData.Result;
                    if (model.ListData.size() == 0) { model.isnull = true; } else { model.isnull = false; }
                    model.page.total = resultData.Result1;
                    laypage({
                        cont: 'pageDiv', //容器。值支持id名、原生dom对象，jquery对象。
                        pages: Math.ceil(parseInt(resultData.Result1) * 1.0 / 8), //通过后台拿到的总页数
                        curr: 1, //初始化当前页
                        skin: 'molv',
                        jump: function (e) { //触发分页后的回调
                            if (e.curr != model.page.pageindex) {
                                $.getJSON('/API/VIEWAPI.ashx?Action=KSGL_GETKSUSER', { p: e.curr, pagecount: model.page.pagecount, P1: tempindex.KSAPID }, function (resultData) {
                                    if (resultData.ErrorMsg == "") {
                                        model.ListData.clear();
                                        model.ListData = resultData.Result;
                                    }
                                })
                                model.page.pageindex = e.curr;
                            }
                        }
                    });
                }
            })
        },
        DFView: function (KSAPID, UserName) {
            top.ComFunJS.winviewform("/ViewV5/AppPage/KSGL/USERKSDA.html?ID=" + KSAPID + "&&USER=" + UserName, "试卷", "1000", "");
        }, 
    })
    //# sourceURL=SJGL.js

</script>